package ch.trackedbean.tracking.internal;

/**
 * Entry for an owner of a status holding element.
 * 
 * @author M. Hautle
 * @since 10.12.2010
 */
public class OwnerEntry {
    /** The owner. */
    final IChildStatus owner;

    /** The name of the owning property or null. */
    final String property;

    /**
     * Default constructor.
     * 
     * @param owner The owner
     * @param property The name of the owning property or null
     */
    public OwnerEntry(IChildStatus owner, String property) {
        this.owner = owner;
        this.property = property;
    }

    /**
     * Fires the content changed event to the parent.
     * 
     * @param child The child
     */
    public void fireChange(Object child) {
        owner.childContentChanged(property, child);
    }
}